import React from 'react'
import useCount from './useCount'
import useTitle from './useTitle'

export default function HooksCounter() {
  const { count, handleClick } = useCount()
  useTitle(count)

  return (
    <>
      <h1>{count}</h1>
      <button onClick={handleClick}>add</button>
    </>
  )
}
